<template>
  <div id="app">
   
    <!-- <router-link to="/home">首页</router-link>
    <router-link to="/about">关于</router-link> -->
    <!-- <router-link :to="'/user/' + userId">用户</router-link>
    <router-link :to="{ path: '/profile', query: { name: 'xiaoming', age: 18 } }">个人中心</router-link> -->
    <!-- <button @click="userClick">用户</button>
    <button @click="profileClick">个人中心</button> -->
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
    
  </div>
</template>

<script>


export default {
  name: 'App',
  data() {
    return {
      userId: "wangwu"
    }
  },
  components: {

  },
  methods: {
    userClick() {
      this.$router.push('/user/' + this.userId)
    },
    profileClick() {
      this.$router.push({
        path: '/profile',
        query: {
          name: 'xiaoming',
          age: 18,
          height: 1.88
        }
      })
    }
  }
}
</script>

<style></style>
